Software Development
Object-Oriented Programming in Java
Java OOP: Access Modifiers for Regulating Access
Java OOP: Interfaces & Anonymous Classes
Java OOP: Multi-level Inheritance
Java OOP: Run-time & Compile-time Polymorphism
Java OOP: The Role of Constructors in Inheritance
Java OOP: The Semantics of the final & abstract Keywords
Java OOP: Understanding Inheritance & Polymorphism in Java
Java OOP: Understanding Overriding & Hiding in Inheritance

Java OOP: Access Modifiers for Regulating Access

Course Number:
it_jdoopjdj_07_enus
Lesson Objectives

Java OOP: Access Modifiers for Regulating Access

  • discover the key concepts covered in this course
  • describe properties of public, private, and protected access modifiers
  • recognize how access works from one package into another
  • use the protected access modifier
  • use the protected keyword across packages
  • recognize the semantics of using default access modifiers inside the same package
  • recognize the semantics of using default access modifiers outside the current package
  • summarize the key concepts covered in this course

Overview/Description

In this course, you will learn about access modifiers that can be used to tag member variables and member functions inside Java classes to regulate how these can be accessed from different contexts. Participants begin by examining the properties of public, private, and protected access modifiers. These properties govern how classes, member functions, and member variables can be accessed within the same class, outside the same class but within the same package, and in entirely different packages. This leads into an examination of cross-package access and how access works from one package into another. You will then learn about the semantics of protected members, and the use of the protected access modifier. Next, explore the cross-package access of protected members, which enables you to use the protected keyword across packages. As the course concludes, you will learn about the semantics of using default access modifiers both inside and outside the same package.



Target

Prerequisites: none

Java OOP: Interfaces & Anonymous Classes

Course Number:
it_jdoopjdj_08_enus
Lesson Objectives

Java OOP: Interfaces & Anonymous Classes

  • discover the key concepts covered in this course
  • use interfaces and recognized that all of their methods are abstract by default
  • recognize how the instanceof operator works the same way with interfaces as with classes
  • implement a derived class that can both extend a base class and implement an interface
  • set up two inheritance hierarchies and combine these into a set of objects that implement both set of interfaces
  • use interfaces that support default method implementations
  • set up a class that implements some of the methods of an interface and then declares itself abstract
  • create and define anonymous inner class objects
  • access outer class variables from your anonymous inner class
  • summarize the key concepts covered in this course

Overview/Description

In this course, you will focus on one of the most important concepts in all object-oriented programming for Java, the interface. Learners explore how anonymous inner classes provide lightweight instantiations of interfaces, and how interfaces are pure abstract entities. Begin with an introduction into using interfaces and how all their methods are abstract by default. Examine how the instanceof operator works the same way with interfaces as with classes. This leads on to combining the extends and implements keywords: implementing a derived class that can extend a base class and implement an interface. Then learners learn to set up two inheritance hierarchies and combine these into a set of objects that implement both sets of interfaces. Advanced features of interfaces are also examined. Learn how interfaces can support default method implementations. You will set up a class that implements some of the methods of an interface and declares itself abstract. Finally, you will create and define anonymous inner class objects and access outer class variables from your anonymous inner class.



Target

Prerequisites: none

Java OOP: Multi-level Inheritance

Course Number:
it_jdoopjdj_03_enus
Lesson Objectives

Java OOP: Multi-level Inheritance

  • discover the key concepts covered in this course
  • recognize how you can access multiple derived classes by using a base class in multilevel inheritance
  • use the instanceof operator to check that an object is an instance of every class in its inheritance hierarchy
  • recognize how to apply multilevel inheritance when every object of the derived class is an object of the base class, but not every object of the base class is an object of the derived class
  • recognize how you can upcast multiple levels up and how downcasting is very dangerous
  • perform various casting operations
  • construct two parallel base classes and derived classes for each of those base classes
  • recognize situations where multiple inheritance is not allowed
  • summarize the key concepts covered in this course

Overview/Description

In this course, learners will focus on creation of multilevel inheritance in Java and how such hierarchies include child and grand-child classes that all inherit from a common ancestor base class. Begin with an introduction to multilevel inheritance, and how you can access multiple derived classes by using a base class in multilevel inheritance. Explore use of the instanceof operator, where you can check that an object is an instance of every class in its inheritance hierarchy. Concerning the Is-A Relationship, you will learn how to apply multilevel inheritance when every object of the derived class is an object of the base class, but not every object of the base class is an object of the derived class. Examine downcasting; see how to upcast multiple levels; learn why downcasting is very dangerous; and perform various upcasting operations. After moving on to multilevel inheritance hierarchies, you will construct two parallel base classes and derived classes for each of those base classes. Finally, explore use of the extends keyword, recognizing situations where multiple inheritance is allowed.



Target

Prerequisites: none

Java OOP: Run-time & Compile-time Polymorphism

Course Number:
it_jdoopjdj_04_enus
Lesson Objectives

Java OOP: Run-time & Compile-time Polymorphism

  • discover the key concepts covered in this course
  • describe run-time and compile-time polymorphism
  • recognize how run-time polymorphism works
  • use the @Override annotation
  • recognize how polymorphism works in the presence of a multilevel inheritance hierarchy
  • recognize how easy it is to add a class into an inheritance hierarchy
  • use compile-time polymorphism and method overriding
  • use compile-time polymorphism, including type promotions
  • recognize that compile-time polymorphism does not include type demotions
  • use a combination of run-time and compile-time polymorphism
  • summarize the key concepts covered in this course

Overview/Description

In this 9-video course, you will learn about specific contrasts between run-time, compile-time polymorphism, and inheritance hierarchy in Java, including use of the Override annotation and type promotions in method overloading. Beginning with an introduction to polymorphism, you will examine run-time and compile-time polymorphism and recognize how run-time polymorphism works. In other tutorials, participants will look at the use of the @Override annotation, then look at how polymorphism works in the presence of a multilevel inheritance hierarchy, which leads on to discovering how easy it is to add a class into an inheritance hierarchy. You will then be introduced to the use of compile-time polymorphism and method overriding. To understand type promotion, you will begin to use compile-time polymorphism, including type promotions. In addition, you will learn how to recognize that compile-time polymorphism does not include type demotions. As the course concludes, you will learn how to use a combination of run-time and compile-time polymorphism.



Target

Prerequisites: none

Java OOP: The Role of Constructors in Inheritance

Course Number:
it_jdoopjdj_02_enus
Lesson Objectives

Java OOP: The Role of Constructors in Inheritance

  • discover the key concepts covered in this course
  • identify the role of access modifiers and recognize the basics of constructors
  • recognize when you add your own constructor, Java takes away the default no-argument constructor it had provided
  • apply the two ways of initializing derived classes - implement an explicit no argument constructor in the base class or use the super keyword and have only parameterized constructors in both the base and derived classes
  • recognize that a base class's constructor is invoked when a derived class object is instantiated
  • identify what happens when there is a base and derived class that have many different constructors
  • add a member variable into a derived class and ensure it is correctly initialized, even in addition to any invocations of the base class constructor
  • summarize the key concepts covered in this course

Overview/Description

In this course, you will learn the role of constructors and how to use the super keyword in architecting inheritance hierarchies in Java. You will begin by identifying the role of access modifiers and recognizing the basics of superclass constructors. When you add your own constructor, you will see that Java takes away the default no-argument constructor it had provided. You will learn how to apply the two ways of initializing derived classes: implement an explicit no argument constructor in the base class or use the super keyword and have only parameterized constructors in both the base and derived classes. You will recognize that a base class's constructor is invoked when a derived class object is instantiated and identify what happens when there is a base and derived class that have many different constructors. You will be able to initialize member variables: add a member variable into a derived class and ensure it is correctly initialized, even in addition to any invocations of the base class constructor.



Target

Prerequisites: none

Java OOP: The Semantics of the final & abstract Keywords

Course Number:
it_jdoopjdj_06_enus
Lesson Objectives

Java OOP: The Semantics of the final & abstract Keywords

  • discover the key concepts covered in this course
  • recognize how you can assign a member variable to be final and the implications of doing so
  • define and use static final member variables
  • instantiate final arrays
  • create and use final classes and final methods
  • recognize the implications of defining a class as abstract
  • recognize how to extend abstract classes and the implications of doing so
  • recognize that a class can only be instantiated if it has implemented all abstract methods
  • summarize the key concepts covered in this course

Overview/Description

In this course, participants learn about two specific and important aspects of Java—the final and abstract keywords. The final keyword can be used to mark member variables, member functions, and even entire classes, with different meanings in each context. You will discover how to mark variables as final, and the implications of doing so. Learn how to correctly instantiate final arrays. Remember that arrays are reference types, pointing to a block of memory, and remember that once an array has been marked as final, it can only be initialized once. Discover how to create and use final classes and final methods. Final classes cannot be extended. You will learn to recognize the implications of defining a class as abstract. Also, learn how to extend abstract classes and the implications of doing so. As the course concludes, you will discover that a class can only be instantiated if it has implemented all abstract methods.



Target

Prerequisites: none

Java OOP: Understanding Inheritance & Polymorphism in Java

Course Number:
it_jdoopjdj_01_enus
Lesson Objectives

Java OOP: Understanding Inheritance & Polymorphism in Java

  • discover the key concepts covered in this course
  • identify advantages and applications of inheritance
  • apply inheritance to model real-world entities
  • identify advantages and applications of polymorphism
  • recognize how the methods derived from java.lang.Object work
  • recognize how all built-in Java classes possess the methods derived from java.lang.Object
  • recognize how objects of derived classes will have independent copies of member variables even from the derived class
  • recognize how in single inheritance, every object of the derived class is an object of the base class, but not every object of the base class is an object of the derived class
  • recognize how to upcast and downcast and how downcasting can sometimes be dangerous
  • recognize how you can create one base class with multiple derived classes
  • summarize the key concepts covered in this course

Overview/Description

In this course, you will explore the basics of inheritance and run-time polymorphism in Java, and how these concepts can be used to model Is-A relationships. Begin with an introduction to inheritance, and how to identify its advantages and applications. You will then apply inheritance to model real-world entities. Next, learn the concepts of polymorphism, its advantages and applications. Then move on to recognizing how the methods derived from java.lang.Object work, and also how all built-in Java classes possess the methods derived from java.lang.Object. You will examine how objects of derived classes have independent copies of member variables, even from the derived class. Following an introduction to the Is-A relationship, you will learn how to recognize, in single inheritance, that every object of the derived class is an object of the base class, but not every object of the base class is an object of the derived class. Explore how to upcast and downcast, and learn how downcasting can sometimes be dangerous. Finally, learn how one base class can be created with multiple derived classes.



Target

Prerequisites: none

Java OOP: Understanding Overriding & Hiding in Inheritance

Course Number:
it_jdoopjdj_05_enus
Lesson Objectives

Java OOP: Understanding Overriding & Hiding in Inheritance

  • discover the key concepts covered in this course
  • apply method overriding and recognize the concept of hiding
  • use the super keyword inside any method invocation in the derived class
  • use advanced forms of overriding
  • combine method overriding with fairly complex inheritance hierarchies
  • recognize that static methods don't support run-time polymorphism
  • recognize how static methods are bound using compile-time rather than run-time binding
  • override the method .toString, which is inherited from java.lang.Object
  • describe how the .equals method and the == operator are related
  • correctly override the .hashCode method and write the code to correctly override the .equals method, which is inherited from java.lang.Object
  • completely and correct implement the .hashCode contract
  • summarize the key concepts covered in this course

Overview/Description

In this course, you will learn about method overriding, including the use of the super keyword from contexts other than within constructions, and also examine the behavior of static methods. To start, participants learn how to apply method overriding and recognize the concept of hiding, and use the super keyword inside any method invocation in the derived class. This follows on to the use of advanced forms of overriding, combining method overriding with complex inheritance hierarchies. Study static methods and static binding, recognizing that static methods do not support run-time polymorphism. Examine pitfalls to avoid with static methods by learning to recognize how static methods are bound using compile-time rather than run-time binding. Learn how to correctly override the method .toString, which is inherited from java.lang.Object, and describe how the .equals method and the == operator are related. Explore how to correctly override the .hashCode method and write the code to correctly override the .equals method, inherited from java.lang.Object. Finally, after studying the link between equals and hashCode, discover how to implement the .hashCode contract.



Target

Prerequisites: none

Close Chat Live